﻿using System;
using System.Runtime.Serialization;

#pragma warning disable 0649

namespace BattleNet.D3
{
    /// <summary>
    /// 
    /// </summary>
    [DataContract]
    public class Profile : BattleNetObject
    {
        /// <summary>
        /// 
        /// </summary>
        [DataMember(Name = "heroes")]
        private ProfileHero[] _heroes;
        /// <summary>
        /// 
        /// </summary>
        public ProfileHero[] Heroes
        {
            get { return this._heroes; }
        }

        /// <summary>
        /// 
        /// </summary>
        [DataMember(Name = "lastHeroPlayed")]
        private long _lastHeroPlayed;
        /// <summary>
        /// 
        /// </summary>
        public ProfileHero LastHeroPlayed
        {
            get
            {
                for (int i = 0; i < this._heroes.Length; i++)
                {
                    if (this._heroes[i].Id == this._lastHeroPlayed)
                    {
                        return this._heroes[i];
                    }
                }

                return null;
            }
        }
        
        /// <summary>
        /// 
        /// </summary>
        [DataMember(Name = "lastUpdated")]
        private long _lastUpdated;
        /// <summary>
        /// 
        /// </summary>
        public DateTime LastUpdated
        {
            get { return BattleNet.UnixTimeStampToDateTime(this._lastUpdated); }
        }

        /// <summary>
        /// 
        /// </summary>
        [DataMember(Name = "artisans")]
        private Artisan[] _artisans;
        /// <summary>
        /// 
        /// </summary>
        public Artisan[] Artisans
        {
            get { return this._artisans; }
        }

        /// <summary>
        /// 
        /// </summary>
        [DataMember(Name = "hardcoreArtisans")]
        private Artisan[] _hardcoreArtisans;
        /// <summary>
        /// 
        /// </summary>
        public Artisan[] HardcoreArtisans
        {
            get { return this._hardcoreArtisans; }
        }

        /// <summary>
        /// 
        /// </summary>
        [DataMember(Name = "kills")]
        private Kills _kills;
        /// <summary>
        /// 
        /// </summary>
        public Kills Kills
        {
            get { return this._kills; }
        }

        /// <summary>
        /// 
        /// </summary>
        [DataMember(Name = "timePlayed")]
        private TimePlayed _timePlayed;
        /// <summary>
        /// 
        /// </summary>
        public TimePlayed TimePlayed
        {
            get { return this._timePlayed; }
        }

        /// <summary>
        /// 
        /// </summary>
        [DataMember(Name = "fallenHeroes")]
        private FallenHero[] _fallenHeroes;
        /// <summary>
        /// 
        /// </summary>
        public FallenHero[] FallenHeroes
        {
            get { return this._fallenHeroes; }
        }

        /// <summary>
        /// 
        /// </summary>
        [DataMember(Name = "battleTag")]
        private string _battleTag;
        /// <summary>
        /// 
        /// </summary>
        public string BattleTag
        {
            get { return this._battleTag; }
        }
        
        /// <summary>
        /// 
        /// </summary>
        [DataMember(Name = "progression")]
        private Progression _progression;
        /// <summary>
        /// 
        /// </summary>
        public Progression Progression
        {
            get { return this._progression; }
        }

        /// <summary>
        /// 
        /// </summary>
        [DataMember(Name = "hardcoreProgression")]
        private Progression _hardcoreProgression;
        /// <summary>
        /// 
        /// </summary>
        public Progression HardcoreProgression
        {
            get { return this._hardcoreProgression; }
        }       


        /// <summary>
        /// 
        /// </summary>
        public Profile()
        {
        }
    }
}
